package demo03practice;

import java.util.ArrayList;

public class Demo01 {
    public static void main(String[] args) {
        String[] arr = {"010", "3223", "666", "7890987", "123123"};
        for (int i = 0; i < arr.length; i++) {
            String str = arr[i];
            char[] c = str.toCharArray();
            int max = c.length - 1;
            boolean flag = false;

            for (int min = 0; min <= max; min++, max--) {
            if (c[min] != c[max]) {
                    flag = true;
                }
            }
            if (flag) {
                System.out.println(str + "不是对称的");
            } else {
                System.out.println(str + "是对称的");
            }
        }
    }
}